
class Person {
  //构造函数
  constructor(name) {
    this.name = name;
  }

  say() {
    console.log(this.name);
  }
  //静态方法
  static create(name) {
    //静态方法中,this不会指向某个实例对象,指向当前类型
    console.log(this);
    return new Person(name)
  }
}

const p = Person.create('tom')
p.say()